﻿@using PopForums.Extensions;
@model PopForums.Models.SetupVariables
<!DOCTYPE html>

<html>
<head>
    <title>@PopForums.Resources.PopForumsSetup</title>
	<link href="~/Content/PopForums/Structure.css" rel="stylesheet" type="text/css" />
	<link href="~/Content/PopForums/Style.css" rel="stylesheet" type="text/css" />
	<script src="~/Scripts/jquery-2.0.3.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$("table.stripe tr:even").addClass("stripe");
			var useEsmtp = $("#UseEsmtp:checkbox");
			SetEsmtpBoxes();
			useEsmtp.click(function () { SetEsmtpBoxes(); });
		});

		function SetEsmtpBoxes() {
			var enabled = $("#UseEsmtp:checkbox").is(":checked");
			if (enabled)
				$("#SmtpUser, #SmtpPassword").removeAttr("disabled");
			else
				$("#SmtpUser, #SmtpPassword").attr("disabled", "disabled");
		}
	</script>
</head>
<body>
	<div id="ForumContainer">
		<div id="TopBreadcrumb" class="navAbsolute">
			<h1>@PopForums.Resources.PopForumsSetup</h1>
			<p>Welcome to POP Forums!</p>
		</div>

		<p>@PopForums.Resources.SetupConnSuccess:</p>

		@using (Html.BeginForm())
		{
			<table class="stripe settings forumGrid account">
				<tr>
					<td>@PopForums.Resources.ForumTitle</td>
					<td>@Html.TextBoxFor(s => s.ForumTitle)</td>
				</tr>
			</table>

			<table class="stripe settings forumGrid account">
				<tr>
					<td>@PopForums.Resources.SmtpServer</td>
					<td>@Html.TextBoxFor(s => s.SmtpServer)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.SmtpPort</td>
					<td>@Html.TextBoxFor(s => s.SmtpPort, new { @class = "shortValue" })</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.FromEmailAddress</td>
					<td>@Html.TextBoxFor(s => s.MailerAddress)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.UseSsl</td>
					<td>@Html.CheckBoxFor(s => s.UseSslSmtp)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.UseEsmtpCred</td>
					<td>@Html.CheckBoxFor(s => s.UseEsmtp)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.SmtpUser</td>
					<td>@Html.TextBoxFor(s => s.SmtpUser)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.SmtpPassword</td>
					<td>@Html.TextBoxFor(s => s.SmtpPassword)</td>
				</tr>
			</table>
	  
			<table class="stripe settings forumGrid account">
				<tr>
					<td>@PopForums.Resources.TimeZone</td>
					<td>
						@Html.TimeZoneDropDown("ServerTimeZone", null, Model.ServerTimeZone)
					</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.UseDaylight</td>
					<td>
						@Html.CheckBoxFor(s => s.ServerDaylightSaving)
						<label for="ServerDaylightSaving">Use Daylight Saving</label>
					</td>
				</tr>
			</table>
	  
			<table class="stripe settings forumGrid account">
				<tr>
					<td colspan="2">@PopForums.Resources.SetupFirstUser:</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.DisplayName</td>
					<td>@Html.TextBoxFor(s => s.Name)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.Email</td>
					<td>@Html.TextBoxFor(s => s.Email)</td>
				</tr>
				<tr>
					<td>@PopForums.Resources.Password</td>
					<td>@Html.PasswordFor(s => s.Password)</td>
				</tr>
			</table>
	 
			<input type="submit" value="@PopForums.Resources.SetupDatabase" />
		}
	</div>
</body>
</html>
